package com.briup.me_blog.aspect;

import org.aspectj.lang.annotation.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


@Aspect
@Component
public class LogAspect {
    private  final Logger logger =  LoggerFactory.getLogger(this.getClass());
    @Pointcut("execution(* com.briup.me_blog.web.*.*(..))")
    public  void  log(){
    }
    @Before("log()")
    public  void doBefore(){
    logger.info("--------------------");
    }
    @After("log()")
    public  void doAfter(){
        logger.info("--------------------");
    }
    @AfterReturning(returning = "result",pointcut = "log()")
    public  void doReturn(Object result){
        logger.info("Result : {}"+result);
    }

}
